package com.hospital.frontdesk.fronxiang.service.impl;

import com.github.pagehelper.PageHelper;
import com.hospital.frontdesk.fronxiang.dao.DoctorQueueMapper;
import com.hospital.frontdesk.fronxiang.entity.DoctorQueue;
import com.hospital.frontdesk.fronxiang.service.DoctorQueueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description：挂号业务层实现类
 * @author：xyj
 * @date：2021/9/7 22:09
 * @versions：v1.0
 */
@Service
public class DoctorQueueServiceImpl implements DoctorQueueService {
    @Autowired
    private DoctorQueueMapper departmentQueueMapper;

    /**
     * 分页查询挂号表
     *
     * @param patientId   用户编号
     * @param currentPage 当前页码
     * @param pageSize    查询条数
     * @return
     */
    @Override
    public List<DoctorQueue> pagequeue(Integer patientId, Integer currentPage, Integer pageSize) {
        PageHelper.startPage(currentPage, pageSize);
        return departmentQueueMapper.pagequeue(patientId);
    }
}
